#include <stdio.h>
#include <pthread.h>

extern int clientmain();
extern int servermain();

int main1(){

    void * retval;

    pthread_t client;
    pthread_t server;

    int server_t= pthread_create(&server,NULL,(void*)&servermain,NULL);
    int client_t= pthread_create(&client,NULL,(void*)&clientmain,NULL);

    if(server_t!=0){
        perror("server thread create failed\n");
    } else{
        printf("server thread create success!\n");
    }
    if(client_t!=0){
        perror("client thread create failed\n");
    } else{
        printf("client thread create success!\n");
    }


    pthread_join(server,&retval);
    pthread_join(client,&retval);

    return 0;
}
